﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Common;
using System.Data;
using Sinacor.Infra.Service.Data;

namespace Sinacor.OMM.OrderExecutor.ResourceAccess
{
    public class FinancialExecutor: BaseResourceAccess
    {
        
        private Int32 _companyId;

        #region Constructor

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="companyID"></param>
        public FinancialExecutor(Int32 companyId)
            : base(companyId)
        {
            _companyId = companyId;
        }

        #endregion

        #region Methods

        /// <summary>
        /// Execute process order
        /// </summary>
        public void ExecuteCalcFinancial()
        {
            using (DbCommand command = this.DataBase.GetStoredProcCommand("PR_CALFME.FIN_MEG"))
            {
                this.DataBase.AddInParameter(command, "P_NADA", DbType.String, "X");
                this.DataBase.ExecuteNonQuery(command);
            }
        }

        #endregion

    }
}
